<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="{{__PUBLIC__}}/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="{{__PUBLIC__}}/Admin/Flat/img/favicon.ico">
	    <script src="{{__PUBLIC__}}/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	    <script type="text/javascript">
		$(function(){
			//点击'X'之后
			$('.close_pic').click(function(){
				//关闭图片，X也消失
				$('.img').remove();
				//显示上传表单
				$('.file').html('<input type="file" name="logo">');
			})
		})
		</script>
	</head>
	<body>
		<form action=""method="post" enctype="multipart/form-data">
		<div class="alert alert-success">编辑品牌</div>
		<div class="form-group">
			<label for="exampleInputEmail1">品牌名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入友链名称" required="" name="bname" value="{{$oldData['bname']}}">
		</div>

		<div class="form-group">
			<label for="exampleInputEmail1">logo</label>
			<!-- 如果有缩略图则显示 -->
			{{if value="$oldData['logo']"}}
				<div class="img">
					<img src="{{__ROOT__}}/{{$oldData['logo']}}" height="50">
					<a href="javascript:;" class="close_pic">X</a>
					<input type="hidden" name="logo" value="{{$oldData['logo']}}">
				</div>
				{{else}}
					<input type="file"  name="logo">
			{{endif}}
			<div class="file">
				
			</div>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入排序" required="" name="sort" value="{{$oldData['sort']}}">
		</div>
		<div class="form-group">
			<label class="radio-inline">
			  <input type="radio" name="hot" id="inlineRadio1" {{if value="$oldData['hot'] eq 1" }} checked {{endif}}  value="1"> 是
			</label>
			<label class="radio-inline">
			  <input type="radio" name="hot" id="inlineRadio2" {{if value="$oldData['hot'] eq 0" }} checked {{endif}} value="2"> 否
			</label>
		</div>
		<input type="hidden" name="bid" value="{{$_GET['bid']}}">
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
